package com.jz.main.io.nio;

public class Ar {
//    @Transactional(rollbackFor = Exception.class)
    public  void test(){

        try {
            updateA();
            updateB();
            log();
        }catch (Exception e){
            log();
            throw e;
        }finally {

        }
        try {
            log();
        }catch (Exception e){
            log();
        }
//        id、   userid、 money、date
//        select userid,sum(money) from table where data ="2023-03-25" groub by userid limit 0,10
    }

    private void log(){

    }

    private void updateA(){

    }
    private void updateB(){

    }



    volatile static int sum;
    static int[] sum1={1,2,3,4,5,6,7,8,9};
    static int[] sum2={1,2,3,4,5,6,7,8,9};

    public static void main(String[] args) {

        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i : sum1) {
                    sum = sum+i;
                    System.out.println(sum);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i : sum2) {
                    sum = sum+i;
                    System.out.println(sum);
                }
            }
        }).start();



    }
}
